#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
int a[123456], q[123456], n, head=0, tail;
int main(){
    freopen("duel.in", "r", stdin);
    freopen("duel.out", "w", stdout);
    scanf("%d", &n);
    for(int i=1;i<=n;i++){
        scanf("%d", &a[i]);
    }
    sort(a+1, a+n+1);
    q[0] = -1111111;
    for(tail=1;tail<=n;tail++){
        q[tail] = a[tail];
        if(q[head]<q[tail]){
            q[head] = 0;
            head++;
        }
    }
    printf("%d", tail-head);
    return 0;
}
//g++ x.cpp -o x -O2 -std=c++14 -Wall -Wshadow